1. Field of the Invention
The present invention relates to video decoding systems. More particularly, the present invention relates to a method and apparatus for performing motion compensation, data reduction, and color format conversion.
2. Background
During the last several years, advances in electronic communications systems have greatly improved the way in which people exchange information. The advances in real-time video systems have proceeded at a particularly fast pace. Services such as multi-party interactive games, video teleconferencing, and video-on-demand are being developed. These and other video services will require cost-effective video decoders.
There are several standards which provide an efficient way to represent image sequences in the form of compact coded data. At present, two MPEG standards predominate. The MPEG-1 standard handles, data at 1.5 Mbits/second and can reconstruct video frames at 30 Hz. Each frame has a resolution of 352 pixels by 240 lines in the NTSC video standard and 352 pixels by 288 lines in the PAL video standard.
The MPEG-2 standard was created due to the need to efficiently represent broadcast video. According to the MPEG-2 standard, 720 pixels per line by 480 lines are displayed for NTSC. The PAL resolution is 720 pixels per line by 576 lines. Decoding MPEG-2 video data requires several steps including inverse discrete cosine transform, half pel (pixel) compensation, and merge prediction. These functions are described in the ISO MPEG-2 Standard Document ISO/IEC 13818-2: 1995(E).
In multimedia products for the personal computer, video processing is typically distributed among several applications. These applications include a video capture engine, a motion compensation engine, and an overlay engine. Each of the applications interfaces with a frame buffer to read and/or write video data. The frame buffer picture elements (pixels) comprise a rectangular grid of image data that are filtered, stored and displayed using multiple color spaces: red, green and blue (RGB) is often used for graphic data; and the luminance/chrominance (Y, UV) format is often used for full-motion is video data. Due to memory bandwidth limitations, it is desirable to decrease the amount of frame buffer accesses.
Some motion compensation engines interface with frame memory to read input data, store intermediate data, and store motion compensated data. The high amount of frame memory accesses decreases the available memory bandwidth for other video applications, resulting in degraded performance.
Also, most motion compensation systems input frame data according to one color format and use a different color format for display. Typically, the input format is YUV 4:2:0. Video data in this format is typically converted to YUV 4:2:2 format after motion compensation is performed. The YUV format conversion is typically performed in an application separate from the motion compensation unit. Separating the color format conversion requires additional frame memory accesses to read the motion compensated data from frame memory and write the YUV reformatted data back to frame memory.
Furthermore, video data must often be reduced at some time after motion compensation and prior to display. The data may be reduced to due to memory bandwidth limitations, or to display a source image having a different size than the display size. A typical video system reduces the data just prior to display, requiring an unnecessarily large amount of data to be handled in the earlier stages of video processing.
Separating data reduction and color format conversion from the motion compensation engine increases memory bandwidth requirements and requires extra hardware to implement. A need exists in the prior art for a motion compensator, data reducer and color format converter which eliminates hardware redundancies and minimizes frame buffer accesses while maintaining image quality.
The present invention provides a method and apparatus for video motion compensation, data reduction and color format conversion such that frame memory references are minimized. Motion compensation can be provided to reconstruct video frames from compressed video data. Data reduction may also be employed to reduce the amount of video data written. In addition, video data may be converted from one color format to another.